package cn.edu.fudan.test;

import cn.edu.fudan.DistanceMeasure.ED;
import cn.edu.fudan.tool.Read;
import cn.edu.fudan.type.Timeseries;
import cn.edu.fudan.type.TwoTuple;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 80494 on 2017/4/20.
 */
public class main {
    public static void main(String[] args) throws Exception {
        String trainfilepath = "E:\\UCR_TS_Archive_2015_DATASET\\UCR_TS_Archive_2015\\Gun_Point\\Gun_Point_TRAIN";
        String testfilepath="E:\\UCR_TS_Archive_2015_DATASET\\UCR_TS_Archive_2015\\Gun_Point\\Gun_Point_TEST";
        Read readtrainfile = new Read();
        Read readtestfile = new Read();
        List<Timeseries> testdata = new ArrayList<Timeseries>();
        List<Timeseries> traindata = new ArrayList<Timeseries>();
        Integer trainclass_num = 0;
        Integer testclass_num = 0;
        TwoTuple<List<Timeseries> ,Integer> testtuple = readtestfile.readTimeFromUCRFormat(testfilepath);
        TwoTuple<List<Timeseries> ,Integer> traintuple = readtestfile.readTimeFromUCRFormat(trainfilepath);

        ED distance = new ED();
        double d= distance.calldistance(testtuple.first.get(1).getValue(),traintuple.first.get(1).getValue());
        System.out.println(d);
        //System.out.println(readtestfile.readTimeFromUCRFormat(testfilepath));
        //System.out.println(readtrainfile.readTimeFromUCRFormat(trainfilepath));

    }


}
